package com.example.rabbitmq;

import com.codahale.metrics.ConsoleReporter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

import java.util.concurrent.TimeUnit;

@SpringBootApplication
public class RabbitmqApplication {

	public static void main(String[] args) {
		ApplicationContext applicationContext = SpringApplication.run(RabbitmqApplication.class, args);
        ConsoleReporter reporter = applicationContext.getBean(ConsoleReporter.class);
        reporter.start(1,TimeUnit.SECONDS);
	}
}
